package com.demo01_video.repository;

import com.demo01_video.bean.Video;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

//创建VideoRepository，视频仓库
@Repository
public interface VideoRepository extends JpaRepository<Video, Long> {
    List<Video> findByAuthorId(Long authorId);
    
    Page<Video> findByAuthorId(Long authorId, Pageable pageable);
}